//
//  CircleGradientColorView.m
//  LvXi_newVersion
//
//  Created by 王敏 on 16/8/23.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "CircleGradientColorView.h"

@implementation CircleGradientColorView

-(id)initWithFrame:(CGRect)frame{
    if(self = [super initWithFrame:frame]){
       

    }
    return self;
}
-(void)drawRect:(CGRect)rect{
    [super drawRect:rect];
    CGPoint center = CGPointMake(self.width*0.5, self.height*0.5);
    CGContextRef imgCtx = UIGraphicsGetCurrentContext();
    CGContextMoveToPoint(imgCtx, center.x,center.y);
    CGContextSetLineWidth(imgCtx, 5);
    CGContextSetFillColor(imgCtx, CGColorGetComponents([UIColor clearColor].CGColor));
    CGContextSetStrokeColor(imgCtx, CGColorGetComponents([UIColor redColor].CGColor));
    CGContextAddArc(imgCtx, center.x,center.y, 40,  0, M_PI*2, 0);
    CGContextFillPath(imgCtx);
    

}

@end
